package cha.app.multiactivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;


public class Screen2 extends Activity implements OnClickListener{
  private static final String TAG = "Screen 2";
  private Button next, prev;
  
  public void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    setContentView( R.layout.screen2 );
    
    next = (Button)findViewById( R.id.next_screen );
    prev = (Button)findViewById( R.id.prev_screen );
    
    next.setOnClickListener( this );
    prev.setOnClickListener( this );
  }

  @Override
  public void onClick( View v ) {
    if(v.equals(next))
      startActivity(new Intent(this, Screen3.class));
    else if(v.equals(prev))
      startActivity(new Intent(this, MultiActivity.class));
  }
}
